{% extends "base.html" %}

<!--
{% block navbar_right %}
    <li>
        <a href="/accounts/login/">Login</a>
    </li>
    <li>
        <a href="/accounts/register/">Register</a>
    </li>
{% endblock %}
-->

{% block content %}
    
<form action="." method="post" class="well">{% csrf_token %}
    
    <fieldset>

        <legend>Prihlásenie</legend>
                    
        <div class="control-group {% if form.username.errors %}error{% endif %}">
            <label for="id_username" class="control-label">Meno:</label>
            <div class="controls">
                {{ form.username }}
                <span class="help-inline">{{ form.username.errors }}</span>
            </div>
        </div>

        <div class="control-group {% if form.password.errors %}error{% endif %}">
            <label for="id_password" class="control-label">Heslo:</label>
            <div class="controls">
                {{ form.password }}
                <span class="help-inline">{{ form.password.errors }}</span>
            </div>
        </div>

        {% if next %}
            <input type="hidden" name="next" value="{{ next }}" />
        {% else %}
            <input type="hidden" name="next" value="{% url show_current_user %}" />
        {% endif %} 

        <div class="form-actions">
            <input type="submit" value="Prihlásiť" class="btn btn-primary btn-large"/>
        </div>

    </fieldset>       

</form>

{% endblock %}

